/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package fr.smile.liferay.portlet.news.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * This class is used by
 * {@link fr.smile.liferay.portlet.news.service.http.NewsFlagServiceSoap}.
 * </p>
 *
 * @author    Brian Wing Shun Chan
 * @see       fr.smile.liferay.portlet.news.service.http.NewsFlagServiceSoap
 * @generated
 */
public class NewsFlagSoap implements Serializable {
	public static NewsFlagSoap toSoapModel(NewsFlag model) {
		NewsFlagSoap soapModel = new NewsFlagSoap();

		soapModel.setFlagId(model.getFlagId());
		soapModel.setUserId(model.getUserId());
		soapModel.setCreateDate(model.getCreateDate());
		soapModel.setEntryId(model.getEntryId());
		soapModel.setValue(model.getValue());

		return soapModel;
	}

	public static NewsFlagSoap[] toSoapModels(NewsFlag[] models) {
		NewsFlagSoap[] soapModels = new NewsFlagSoap[models.length];

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModel(models[i]);
		}

		return soapModels;
	}

	public static NewsFlagSoap[][] toSoapModels(NewsFlag[][] models) {
		NewsFlagSoap[][] soapModels = null;

		if (models.length > 0) {
			soapModels = new NewsFlagSoap[models.length][models[0].length];
		}
		else {
			soapModels = new NewsFlagSoap[0][0];
		}

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModels(models[i]);
		}

		return soapModels;
	}

	public static NewsFlagSoap[] toSoapModels(List<NewsFlag> models) {
		List<NewsFlagSoap> soapModels = new ArrayList<NewsFlagSoap>(models.size());

		for (NewsFlag model : models) {
			soapModels.add(toSoapModel(model));
		}

		return soapModels.toArray(new NewsFlagSoap[soapModels.size()]);
	}

	public NewsFlagSoap() {
	}

	public long getPrimaryKey() {
		return _flagId;
	}

	public void setPrimaryKey(long pk) {
		setFlagId(pk);
	}

	public long getFlagId() {
		return _flagId;
	}

	public void setFlagId(long flagId) {
		_flagId = flagId;
	}

	public long getUserId() {
		return _userId;
	}

	public void setUserId(long userId) {
		_userId = userId;
	}

	public Date getCreateDate() {
		return _createDate;
	}

	public void setCreateDate(Date createDate) {
		_createDate = createDate;
	}

	public long getEntryId() {
		return _entryId;
	}

	public void setEntryId(long entryId) {
		_entryId = entryId;
	}

	public int getValue() {
		return _value;
	}

	public void setValue(int value) {
		_value = value;
	}

	private long _flagId;
	private long _userId;
	private Date _createDate;
	private long _entryId;
	private int _value;
}